<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/basecore/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<%@ include file="/basecore/meta.jsp"%>		
		<script type="text/javascript">
			function expanded(){
				img=document.getElementById("expColl");					
				if(img.src.indexOf("expanded.gif")>0){
					m=getObject(window.parent.document,"m");					
					getObject("title").style.width="395px";
					m.cols="400px,*";					
					img.src="${contextPath}/webresource/images/ico/collapse.gif";
				}
				else{
					m.cols='200,*';
					getObject("title").style.width="195px";
					img.src="${contextPath}/webresource/images/ico/expanded.gif";
				}
			}
			function doOnClick(nodeId) {
	    		var data = appTree.getUserData(nodeId,"action");	    		
	    		window.parent.frames.main.location=data;
			}
			function refreshTree(){
				appTree.refreshItem(0);
			}
			function refreshTree(nodeId){
				appTree.refreshItem(nodeId);
			}
			function selectTree(nodeId){
				appTree.selectItem(nodeId,false,false);				
			}
			function clearSelection() {
				appTree.clearSelection();
			}
		</script>
	</head>
	<body id="apptreediv" style="width:200px;margin-top:0;">		
		<div id="title" align="right" style="height:20px;width:195px;margin-top:0;">
			<a href="javascript:expanded();">
				<img id="expColl" style="padding: 0 5px 0 0;" class="img16" src="${contextPath}/webresource/images/ico/expanded.gif">
			</a>
		</div>	
		<a href="${contextPath}/metaAppController.wit" target="main">
		<img class="img" src="${contextPath}/webresource/images/meta/application.png">
		应用
		</a>
			
		<a href="javascript:appTree.refreshItem();">
			<img style="border:0px;vertical-align:middle;width:16px;height:16px;" 
			src="${contextPath}/webresource/images/meta/refresh.png">
		</a>
				
		<wit:tree name="appTree" treeBox="apptreediv" rootId="0" 
			childAction="${contextPath}/metaAppTreeController.wit" 
			onClickHandler="doOnClick"/>
	</body>
</html>
